﻿using System;
using System.Globalization;
using System.Collections.Generic;

namespace NazTek.Extension.Clr4.Test
{
    /// <summary>
    /// Sample enum with underlying type int
    /// </summary>
    public enum MockGender
    {
        /// <summary>
        /// Male
        /// </summary>
        [Description(MockData.ENUM_ATTRIBUTE_MALE_VALUE)]
        Male,
        /// <summary>
        /// Female
        /// </summary>
        [Description(MockData.ENUM_ATTRIBUTE_FEMALE_VALUE)]
        Female
    }
    /// <summary>
    /// Sample enum with underlying type byte
    /// </summary>
    internal enum MockSalutation : byte 
    {
        /// <summary>
        /// Mr
        /// </summary>
        Mr,
        /// <summary>
        /// Mrs
        /// </summary>
        Mrs,
        /// <summary>
        /// Miss
        /// </summary>
        Miss,
        /// <summary>
        /// Master
        /// </summary>
        Master
    }
    /// <summary>
    /// Sample enum with underlying type short
    /// </summary>
    internal enum MockAgeGroup : short
    {
        /// <summary>
        /// Young
        /// </summary>
        [Description(MockData.ENUM_ATTRIBUTE_MINAGE_KEY, MockData.ENUM_ATTRIBUTE_YOUNG_MINAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_MAXAGE_KEY, MockData.ENUM_ATTRIBUTE_YOUNG_MAXAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_YOUNG_VALUE)]
        Young,
        /// <summary>
        /// Middle aged
        /// </summary>
        [Description(MockData.ENUM_ATTRIBUTE_MINAGE_KEY, MockData.ENUM_ATTRIBUTE_MIDDLEAGED_MINAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_MAXAGE_KEY, MockData.ENUM_ATTRIBUTE_MIDDLEAGED_MAXAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_MIDDLEAGED_VALUE)]
        MiddleAged,
        /// <summary>
        /// Elder
        /// </summary>
        [Description(MockData.ENUM_ATTRIBUTE_MINAGE_KEY, MockData.ENUM_ATTRIBUTE_ELDER_MINAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_MAXAGE_KEY, MockData.ENUM_ATTRIBUTE_ELDER_MAXAGE_VALUE)]
        [Description(MockData.ENUM_ATTRIBUTE_ELDER_VALUE)]
        Elder
    }
    /// <summary>
    /// Sample serializable class
    /// </summary>
    [Serializable]
    public class MockPerson
    {
        /// <summary>
        /// Gets/Sets the person's name
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// Gets/Sets the person's date of birth
        /// </summary>
        public DateTime Dob { get; set; }
        /// <summary>
        /// Gets/Sets the person's gender
        /// </summary>
        public MockGender Gender { get; set; }
        /// <summary>
        /// Creates a new instance and fully hydrates with default values
        /// </summary>
        public MockPerson()
        {
            this.Name = StringResource.Default.Data_DefaultName;
            this.Dob = MockData.DEFAULT_DOB;
            this.Gender = MockData.DEFAULT_GENDER;
        }
        internal bool Equals(MockPerson pMockPerson)
        {
            return
                this.Name == pMockPerson.Name && 
                this.Dob == pMockPerson.Dob && 
                this.Gender == pMockPerson.Gender;
        }
    }
    /// <summary>
    /// Sample non-serializable class
    /// </summary>
    internal sealed class MockNonserializablePerson
        : MockPerson
    {
    }
    /// <summary>
    /// Sample subclass
    /// </summary>
    [Serializable]
    internal sealed class MockSenior
        : MockPerson
    {
    }
    /// <summary>
    /// Constant values which can't be moved to resource file, due to their use in attributes.
    /// Also provides shortcut static values to constants in the resource file
    /// </summary>
    internal static class MockData
    {
        /// <summary>
        /// MockGender.Male enum attribute value
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MALE_VALUE = "M";
        /// <summary>
        /// MockGender.Female enum attribute value
        /// </summary>
        internal const string ENUM_ATTRIBUTE_FEMALE_VALUE = "F";

        /// <summary>
        /// MockAgeGroup additional info key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MINAGE_KEY = "MinAge";
        /// <summary>
        /// MockAgeGroup.Young additional info value that corresponds to MinAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_YOUNG_MINAGE_VALUE = "18";
        /// <summary>
        /// MockAgeGroup.MiddleAged additional info value that corresponds to MinAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MIDDLEAGED_MINAGE_VALUE = "36";
        /// <summary>
        /// MockAgeGroup.Elder additional info value that corresponds to MinAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_ELDER_MINAGE_VALUE = "66";

        /// <summary>
        /// MockAgeGroup additional info key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MAXAGE_KEY = "MaxAge";
        /// <summary>
        /// MockAgeGroup.Young additional info value that corresponds to MaxAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_YOUNG_MAXAGE_VALUE = "35";
        /// <summary>
        /// MockAgeGroup.MiddleAged additional info value that corresponds to MaxAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MIDDLEAGED_MAXAGE_VALUE = "65";
        /// <summary>
        /// MockAgeGroup.Elder additional info value that corresponds to MaxAge key
        /// </summary>
        internal const string ENUM_ATTRIBUTE_ELDER_MAXAGE_VALUE = "100";

        /// <summary>
        /// MockAgeGroup.Young additional info keyless value
        /// </summary>
        internal const string ENUM_ATTRIBUTE_YOUNG_VALUE = "Ages 18 to 35";
        /// <summary>
        /// MockAgeGroup.MiddleAged additional info keyless value
        /// </summary>
        internal const string ENUM_ATTRIBUTE_MIDDLEAGED_VALUE = "Ages 36 to 65";
        /// <summary>
        /// MockAgeGroup.Elder additional info keyless value
        /// </summary>
        internal const string ENUM_ATTRIBUTE_ELDER_VALUE = "Ages 66 to 100";

        internal const string SERIAL_BASE32_BINARY_MOCK_PERSON_COMPRESSED = "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In6NX/PX+DV+jf+bHvzE8xv9WvTP919kP3iTvx2fvmvzZVNUy/FJWe+P3+RNO0p/Mq/x0We74x38N0pP1mW7rvPPlvm6rbNylL5cT8pi+nvl12+qt/nys4d7+w8+nR3s7e1n+XR/+vDXRV+/+3AX4y+q6duX1Eu1/LWp5W/9+EW2yI/e/v6//5Ns+rZYXjwr8nL2Wz1+Wk26H/62jz/Pl7O87n7+a/4av85vfFOH8iZGj///euj5135STX6Nf+jv+bP+qPkf/Rv8uv8HEel2MDC8X/8yK9f57//7/xq/AaDh+Q3/nwAAAP//1Q675WsBAAA=";
        /// <summary>
        /// Base32 binary serialized MockPerson
        /// </summary>
        internal const string SERIAL_BASE32_BINARY_MOCK_PERSON = "\0\0\0\0ÿÿÿÿ\0\0\0\0\0\0\0\f\0\0\0]NazTek.Extension.Clr4.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92476d8224aec4c9\0\0\0%NazTek.Extension.Clr4.Test.MockPerson\0\0\0<Name>k__BackingField<Dob>k__BackingField<Gender>k__BackingField\0\r%NazTek.Extension.Clr4.Test.MockGender\0\0\0\0\0\0\0\0\0Bob\0Àº˜ˆh‰\büÿÿÿ%NazTek.Extension.Clr4.Test.MockGender\0\0\0\avalue__\0\b\0\0\0\0\0\0\0\v";
        /// <summary>
        /// Base32 binary serialized MockPerson byte array
        /// </summary>
        internal static byte[] SERIAL_BASE32_BINARY_MOCK_PERSON_BYTES = new byte[] { 0, 1, 0, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 83, 69, 110, 116, 101, 114, 112, 114, 105, 115, 101, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 84, 101, 115, 116, 44, 32, 86, 101, 114, 115, 105, 111, 110, 61, 49, 46, 48, 46, 48, 46, 48, 44, 32, 67, 117, 108, 116, 117, 114, 101, 61, 110, 101, 117, 116, 114, 97, 108, 44, 32, 80, 117, 98, 108, 105, 99, 75, 101, 121, 84, 111, 107, 101, 110, 61, 110, 117, 108, 108, 5, 1, 0, 0, 0, 39, 69, 110, 116, 101, 114, 112, 114, 105, 115, 101, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 80, 101, 114, 115, 111, 110, 3, 0, 0, 0, 21, 60, 78, 97, 109, 101, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 20, 60, 68, 111, 98, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 23, 60, 71, 101, 110, 100, 101, 114, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 1, 0, 4, 13, 39, 69, 110, 116, 101, 114, 112, 114, 105, 115, 101, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 71, 101, 110, 100, 101, 114, 2, 0, 0, 0, 2, 0, 0, 0, 6, 3, 0, 0, 0, 3, 66, 111, 98, 0, 192, 186, 152, 136, 104, 137, 8, 5, 252, 255, 255, 255, 39, 69, 110, 116, 101, 114, 112, 114, 105, 115, 101, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 71, 101, 110, 100, 101, 114, 1, 0, 0, 0, 7, 118, 97, 108, 117, 101, 95, 95, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 11 };
        internal static byte[] SERIAL_DEFAULT_ENCODING_BINARY_MOCK_PERSON_BYTES = new byte[] { 0, 1, 0, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 93, 78, 97, 122, 84, 101, 107, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 67, 108, 114, 52, 46, 84, 101, 115, 116, 44, 32, 86, 101, 114, 115, 105, 111, 110, 61, 49, 46, 48, 46, 48, 46, 48, 44, 32, 67, 117, 108, 116, 117, 114, 101, 61, 110, 101, 117, 116, 114, 97, 108, 44, 32, 80, 117, 98, 108, 105, 99, 75, 101, 121, 84, 111, 107, 101, 110, 61, 57, 50, 52, 55, 54, 100, 56, 50, 50, 52, 97, 101, 99, 52, 99, 57, 5, 1, 0, 0, 0, 37, 78, 97, 122, 84, 101, 107, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 67, 108, 114, 52, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 80, 101, 114, 115, 111, 110, 3, 0, 0, 0, 21, 60, 78, 97, 109, 101, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 20, 60, 68, 111, 98, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 23, 60, 71, 101, 110, 100, 101, 114, 62, 107, 95, 95, 66, 97, 99, 107, 105, 110, 103, 70, 105, 101, 108, 100, 1, 0, 4, 13, 37, 78, 97, 122, 84, 101, 107, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 67, 108, 114, 52, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 71, 101, 110, 100, 101, 114, 2, 0, 0, 0, 2, 0, 0, 0, 6, 3, 0, 0, 0, 3, 66, 111, 98, 0, 192, 186, 152, 136, 104, 137, 8, 5, 252, 255, 255, 255, 37, 78, 97, 122, 84, 101, 107, 46, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 67, 108, 114, 52, 46, 84, 101, 115, 116, 46, 77, 111, 99, 107, 71, 101, 110, 100, 101, 114, 1, 0, 0, 0, 7, 118, 97, 108, 117, 101, 95, 95, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 11 };
        internal static byte[] SERIAL_BASE32_BINARY_MOCK_PERSON_BYTES_COMPRESSED = new byte[] { 31, 139, 8, 0, 0, 0, 0, 0, 4, 0, 237, 189, 7, 96, 28, 73, 150, 37, 38, 47, 109, 202, 123, 127, 74, 245, 74, 215, 224, 116, 161, 8, 128, 96, 19, 36, 216, 144, 64, 16, 236, 193, 136, 205, 230, 146, 236, 29, 105, 71, 35, 41, 171, 42, 129, 202, 101, 86, 101, 93, 102, 22, 64, 204, 237, 157, 188, 247, 222, 123, 239, 189, 247, 222, 123, 239, 189, 247, 186, 59, 157, 78, 39, 247, 223, 255, 63, 92, 102, 100, 1, 108, 246, 206, 74, 218, 201, 158, 33, 128, 170, 200, 31, 63, 126, 124, 31, 63, 34, 126, 141, 95, 243, 215, 248, 53, 126, 141, 255, 155, 30, 252, 196, 243, 27, 253, 90, 244, 207, 235, 211, 101, 155, 215, 171, 186, 104, 242, 241, 233, 187, 54, 95, 54, 69, 181, 28, 191, 201, 155, 118, 148, 254, 100, 94, 227, 175, 207, 118, 199, 59, 248, 111, 148, 158, 172, 203, 118, 93, 231, 159, 45, 243, 117, 91, 103, 229, 40, 125, 185, 158, 148, 197, 244, 247, 202, 175, 223, 84, 111, 243, 229, 103, 203, 117, 89, 254, 186, 0, 255, 241, 32, 212, 241, 23, 213, 244, 237, 75, 2, 92, 45, 127, 109, 106, 248, 91, 63, 126, 145, 45, 242, 163, 183, 191, 255, 239, 255, 36, 155, 190, 45, 150, 23, 207, 138, 188, 156, 253, 86, 143, 159, 86, 147, 238, 135, 191, 237, 227, 207, 243, 229, 44, 175, 187, 159, 255, 154, 191, 198, 175, 243, 27, 223, 208, 159, 188, 136, 225, 226, 255, 191, 30, 58, 254, 181, 159, 84, 147, 95, 227, 31, 250, 123, 254, 172, 63, 106, 254, 71, 255, 6, 191, 238, 255, 65, 84, 185, 21, 8, 140, 237, 215, 191, 204, 202, 117, 254, 251, 255, 254, 191, 198, 111, 0, 96, 120, 126, 195, 255, 7, 91, 233, 1, 37, 91, 1, 0, 0 };
        /// <summary>
        /// Base64 binary serialized MockPerson
        /// </summary>
        internal const string SERIAL_BASE64_BINARY_MOCK_PERSON = "AAEAAAD/////AQAAAAAAAAAMAgAAAF1OYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTkyNDc2ZDgyMjRhZWM0YzkFAQAAACVOYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdC5Nb2NrUGVyc29uAwAAABU8TmFtZT5rX19CYWNraW5nRmllbGQUPERvYj5rX19CYWNraW5nRmllbGQXPEdlbmRlcj5rX19CYWNraW5nRmllbGQBAAQNJU5helRlay5FeHRlbnNpb24uQ2xyNC5UZXN0Lk1vY2tHZW5kZXICAAAAAgAAAAYDAAAAA0JvYgDAupiIaIkIBfz///8lTmF6VGVrLkV4dGVuc2lvbi5DbHI0LlRlc3QuTW9ja0dlbmRlcgEAAAAHdmFsdWVfXwAIAgAAAAAAAAAL";
        internal const string SERIAL_BASE64_BINARY_MOCK_SENIOR_LIST = "AAEAAAD/////AQAAAAAAAAAMAgAAAF1OYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTkyNDc2ZDgyMjRhZWM0YzkEAQAAAKkBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tOYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdC5Nb2NrU2VuaW9yLCBOYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTkyNDc2ZDgyMjRhZWM0YzldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAJ05helRlay5FeHRlbnNpb24uQ2xyNC5UZXN0Lk1vY2tTZW5pb3JbXQIAAAAICAkDAAAAAwAAAAMAAAAHAwAAAAABAAAABAAAAAQlTmF6VGVrLkV4dGVuc2lvbi5DbHI0LlRlc3QuTW9ja1NlbmlvcgIAAAAJBAAAAAkFAAAACQYAAAAKBQQAAAAlTmF6VGVrLkV4dGVuc2lvbi5DbHI0LlRlc3QuTW9ja1NlbmlvcgMAAAAgTW9ja1BlcnNvbis8TmFtZT5rX19CYWNraW5nRmllbGQfTW9ja1BlcnNvbis8RG9iPmtfX0JhY2tpbmdGaWVsZCJNb2NrUGVyc29uKzxHZW5kZXI+a19fQmFja2luZ0ZpZWxkAQAEDSVOYXpUZWsuRXh0ZW5zaW9uLkNscjQuVGVzdC5Nb2NrR2VuZGVyAgAAAAIAAAAGBwAAAANCb2IAwLqYiGiJCAX4////JU5helRlay5FeHRlbnNpb24uQ2xyNC5UZXN0Lk1vY2tHZW5kZXIBAAAAB3ZhbHVlX18ACAIAAAAAAAAAAQUAAAAEAAAABgkAAAAESmFuZQBATTtB7LUIAfb////4////AQAAAAEGAAAABAAAAAYLAAAABXdheW5lAICEUdzOqggB9P////j///8AAAAACw==";
        /// <summary>
        /// Base32 soap serialized MockPerson
        /// </summary>
        internal const string SERIAL_BASE32_SOAP_MOCK_PERSON = "<SOAP-ENV:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:clr=\"http://schemas.microsoft.com/soap/encoding/clr/1.0\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n<SOAP-ENV:Body>\r\n<a1:MockPerson id=\"ref-1\" xmlns:a1=\"http://schemas.microsoft.com/clr/nsassem/NazTek.Extension.Clr4.Test/NazTek.Extension.Clr4.Test%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D92476d8224aec4c9\">\r\n<_x003C_Name_x003E_k__BackingField id=\"ref-3\">Bob</_x003C_Name_x003E_k__BackingField>\r\n<_x003C_Dob_x003E_k__BackingField>1950-04-19T00:00:00.0000000-05:00</_x003C_Dob_x003E_k__BackingField>\r\n<_x003C_Gender_x003E_k__BackingField>Male</_x003C_Gender_x003E_k__BackingField>\r\n</a1:MockPerson>\r\n</SOAP-ENV:Body>\r\n</SOAP-ENV:Envelope>\r\n";
        internal const string SERIAL_BASE32_SOAP_MOCK_PERSON_NO_SALT_HASH = "QuPtVWH5/e+xmUdXEXuy2A==";
        /// <summary>
        /// Base64 soap serialized MockPerson
        /// </summary>
        internal const string SERIAL_BASE64_SOAP_MOCK_PERSON = "PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOlNPQVAtRU5DPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VuY29kaW5nLyIgeG1sbnM6U09BUC1FTlY9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3NvYXAvZW52ZWxvcGUvIiB4bWxuczpjbHI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vc29hcC9lbmNvZGluZy9jbHIvMS4wIiBTT0FQLUVOVjplbmNvZGluZ1N0eWxlPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VuY29kaW5nLyI+DQo8U09BUC1FTlY6Qm9keT4NCjxhMTpNb2NrUGVyc29uIGlkPSJyZWYtMSIgeG1sbnM6YTE9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vY2xyL25zYXNzZW0vTmF6VGVrLkV4dGVuc2lvbi5DbHI0LlRlc3QvTmF6VGVrLkV4dGVuc2lvbi5DbHI0LlRlc3QlMkMlMjBWZXJzaW9uJTNEMS4wLjAuMCUyQyUyMEN1bHR1cmUlM0RuZXV0cmFsJTJDJTIwUHVibGljS2V5VG9rZW4lM0Q5MjQ3NmQ4MjI0YWVjNGM5Ij4NCjxfeDAwM0NfTmFtZV94MDAzRV9rX19CYWNraW5nRmllbGQgaWQ9InJlZi0zIj5Cb2I8L194MDAzQ19OYW1lX3gwMDNFX2tfX0JhY2tpbmdGaWVsZD4NCjxfeDAwM0NfRG9iX3gwMDNFX2tfX0JhY2tpbmdGaWVsZD4xOTUwLTA0LTE5VDAwOjAwOjAwLjAwMDAwMDAtMDU6MDA8L194MDAzQ19Eb2JfeDAwM0Vfa19fQmFja2luZ0ZpZWxkPg0KPF94MDAzQ19HZW5kZXJfeDAwM0Vfa19fQmFja2luZ0ZpZWxkPk1hbGU8L194MDAzQ19HZW5kZXJfeDAwM0Vfa19fQmFja2luZ0ZpZWxkPg0KPC9hMTpNb2NrUGVyc29uPg0KPC9TT0FQLUVOVjpCb2R5Pg0KPC9TT0FQLUVOVjpFbnZlbG9wZT4NCg==";

        internal const string SERIAL_POX_MOCK_PERSON = "<MockPerson xmlns=\"http://schemas.datacontract.org/2004/07/NazTek.Extension.Clr4.Test\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><_x003C_Dob_x003E_k__BackingField>1950-04-19T00:00:00</_x003C_Dob_x003E_k__BackingField><_x003C_Gender_x003E_k__BackingField>Male</_x003C_Gender_x003E_k__BackingField><_x003C_Name_x003E_k__BackingField>Bob</_x003C_Name_x003E_k__BackingField></MockPerson>";
        /// <summary>
        /// Gets default age group from resource file (shortcut)
        /// </summary>
        internal static MockAgeGroup DEFAULT_AGE_GROUP = (MockAgeGroup)StringResource.Default.Data_DefaultAgeGroup.ToEnum<MockAgeGroup>();
        /// <summary>
        /// Gets default gender from resource file (shortcut)
        /// </summary>
        internal static MockGender DEFAULT_GENDER = (MockGender)StringResource.Default.Data_DefaultGender.ToEnum<MockGender>();
        /// <summary>
        /// Gets default date of birth from resource file (shortcut), converts from string to DateTime with the culture specified in the resource file
        /// </summary>
        internal static DateTime DEFAULT_DOB = DateTime.Parse(StringResource.Default.Data_DefaultDob, new CultureInfo(StringResource.Default.Env_DefaultDateCulture));

        internal static List<MockPerson> MockPersonList
        {
            get
            {
                return new List<MockPerson>(MockPersonEnumerator);
            }
        }

        internal static IEnumerable<MockPerson> MockPersonEnumerator
        {
            get
            {
                List<MockPerson> persons = new List<MockPerson>();
                persons.Add(new MockPerson());
                persons.Add(new MockPerson() { Name = "Jane", Dob = new DateTime(1990, 1, 1), Gender = MockGender.Female });
                persons.Add(new MockPerson() { Name = "wayne", Dob = new DateTime(1980, 2, 2), Gender = MockGender.Male });
                return persons as IEnumerable<MockPerson>;
            }
        }
        internal static string MockPersonListXml
        {
            get
            {
                return UnformatXml("<DataSet><MockPerson><Name>Bob</Name><Dob>1950-04-19T00:00:00-05:00</Dob><Gender>0</Gender></MockPerson><MockPerson><Name>Jane</Name><Dob>1990-01-01T00:00:00-06:00</Dob><Gender>1</Gender></MockPerson><MockPerson><Name>wayne</Name><Dob>1980-02-02T00:00:00-06:00</Dob><Gender>0</Gender></MockPerson></DataSet>");
            }
        }
        internal static string UnformatXml(string pXml)
        {
            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
            doc.LoadXml(pXml);
            return doc.OuterXml;
        }
    }
}